<?php
namespace App\Core\Annotation;

use Hyperf\Di\Annotation\AbstractAnnotation;
use Attribute;

/**
 * 权限
 * @Annotation
 * @Target({"METHOD"})
 */
#[Attribute(Attribute::TARGET_METHOD)]
class Permission extends AbstractAnnotation
{
    public $value = [];

    public function __construct($value)
    {
        if (is_array($value)) {
            $value = ['value' => $value];
        } else {
            $value = ['value' => [$value]];
        }
        parent::__construct($value);
    }
}

